home *** CD-ROM | disk | FTP | other *** search
- #ifndef NO_MEMORY_H
- #include <memory.h>
- #endif
- #define CURSES_LIBRARY 1
- #include <curses.h>
- #undef savetty
-
- #ifdef PDCDEBUG
- char *rcsid_savetty = "$Header: C:\CURSES\portable\RCS\savetty.c 2.1 1993/06/18 20:21:03 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- savetty() - save/restore terminal modes
-
- X/Open Description:
- These routines save and restore the state of the terminal modes.
- The savetty() function saves the current state in a buffer and
- resetty() restores the state to what it was at the last call to
- savetty().
-
- PDCurses Description:
- FYI: It is very unclear whether this is a duplication of the
- reset_prog_mode() and reset_shell_mode() functions or whether
- this is a backing store type of operation. At this time, they
- are implemented similar to the reset_*_mode() routines.
-
- X/Open Return Value:
- The savetty() function returns OK upon success otherwise ERR is
- returned.
-
- Portability:
- PDCurses int savetty( void );
- X/Open Dec '88 int savetty( void );
- SysV Curses int savetty( void );
- BSD Curses int savetty( void );
-
- **man-end**********************************************************************/
-
- int savetty(void)
- {
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("savetty() - called\n");
- #endif
-
- c_save_tty.been_set = TRUE;
- memcpy(&c_save_tty.saved, &_cursvar, sizeof(SCREEN));
- return( OK );
- }
-